package com.serviceprovider.business.module.admin.bonus.model;

public class BonusReceived {
    private Double  cash;
    private Double  credit;
    private Integer id;
    private Integer paymentId;

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) ||!(obj instanceof BonusReceived)) {
            return false;
        }

        BonusReceived b  = (BonusReceived) obj;
        boolean       eq = ((id == null) && (b.id == null)) || ((id != null) && id.equals(b.id));

        if (!eq) {
            return false;
        }

        eq = ((paymentId == null) && (b.paymentId == null)) || ((paymentId != null) && paymentId.equals(b.paymentId));

        if (!eq) {
            return false;
        }

        eq = ((cash == null) && (b.cash == null)) || ((cash != null) && cash.equals(b.cash));

        if (!eq) {
            return false;
        }

        eq = ((credit == null) && (b.credit == null)) || ((credit != null) && credit.equals(b.credit));

        if (!eq) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int prime  = 31;
        int result = 1;

        result = prime * result + ((id == null)
                                   ? 0
                                   : id.hashCode());
        result = prime * result + ((paymentId == null)
                                   ? 0
                                   : paymentId.hashCode());
        result = prime * result + ((cash == null)
                                   ? 0
                                   : cash.hashCode());
        result = prime * result + ((credit == null)
                                   ? 0
                                   : credit.hashCode());

        return result;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(Integer paymentId) {
        this.paymentId = paymentId;
    }

    public Double getCash() {
        return cash;
    }

    public void setCash(Double cash) {
        this.cash = cash;
    }

    public Double getCredit() {
        return credit;
    }

    public void setCredit(Double credit) {
        this.credit = credit;
    }
}



